package com.lanou.collections;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Vector;

public class Main {
	
	public static void main(String[] args) {
		ArrayList<Integer> list = new ArrayList<>();
		list.add(1);
		list.add(0);
		list.add(3);
		list.remove(0);
		for (int i = 0; i < list.size(); i++) {
			System.out.println(list.get(i));
		}
		Vector<Object> vector = new Vector<>();
		LinkedList<Object> li = new LinkedList<>();
		li.add(2);
		li.addFirst(1);
		li.addLast(3);
		System.out.println(li.peek());;
		System.out.println(li.get(0));
		li.add(null);
		li.size();
		System.out.println("----------------------------------------");
		print(li);
		HashSet<Object> set = new HashSet<>();
		set.add(1);
		
	}

	private static void print(LinkedList<Object> li) {
		for(Object o : li) {
			System.out.println(o);
		}
		
	}

}
